package net.lab1024.sa.admin.module.business.datasource.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.lab1024.sa.admin.module.business.datasource.domain.entity.QueryHistoryEntity;
import net.lab1024.sa.admin.module.business.datasource.domain.vo.QueryHistoryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 查询历史记录
 *
 * @Author 1024创新实验室-主任:卓大
 * @Date 2024-01-01 00:00:00
 * @Wechat zhuoda1024
 * @Email lab1024@163.com
 * @Copyright <a href="https://1024lab.net">1024创新实验室</a>
 */
@Mapper
public interface QueryHistoryDao extends BaseMapper<QueryHistoryEntity> {

    /**
     * 分页查询历史记录
     *
     * @param page 分页参数
     * @param datasourceId 数据源ID
     * @param userId 用户ID
     * @param keyword 搜索关键词
     * @return 分页结果
     */
    Page<QueryHistoryVO> queryPage(Page<QueryHistoryVO> page,
                                  @Param("datasourceId") Long datasourceId,
                                  @Param("userId") Long userId,
                                  @Param("keyword") String keyword);
} 